.class Lcom/waiqin365/base/login/cj;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/hyphenate/EMGroupChangeListener;


# instance fields
.field final synthetic a:Lcom/waiqin365/base/login/LoginMainActivity;


# direct methods
.method private constructor <init>(Lcom/waiqin365/base/login/LoginMainActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/base/login/cj;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/waiqin365/base/login/LoginMainActivity;Lcom/waiqin365/base/login/at;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/waiqin365/base/login/cj;-><init>(Lcom/waiqin365/base/login/LoginMainActivity;)V

    return-void
.end method


# virtual methods
.method public onApplicationAccept(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 5

    sget-object v0, Lcom/hyphenate/chat/EMMessage$Type;->TXT:Lcom/hyphenate/chat/EMMessage$Type;

    invoke-static {v0}, Lcom/hyphenate/chat/EMMessage;->createReceiveMessage(Lcom/hyphenate/chat/EMMessage$Type;)Lcom/hyphenate/chat/EMMessage;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$ChatType;->GroupChat:Lcom/hyphenate/chat/EMMessage$ChatType;

    invoke-virtual {v0, v1}, Lcom/hyphenate/chat/EMMessage;->setChatType(Lcom/hyphenate/chat/EMMessage$ChatType;)V

    invoke-virtual {v0, p3}, Lcom/hyphenate/chat/EMMessage;->setFrom(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Lcom/hyphenate/chat/EMMessage;->setTo(Ljava/lang/String;)V

    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/hyphenate/chat/EMMessage;->setMsgId(Ljava/lang/String;)V

    new-instance v1, Lcom/hyphenate/chat/EMTextMessageBody;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/waiqin365/base/login/cj;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    const v4, 0x7f080025

    invoke-virtual {v3, v4}, Lcom/waiqin365/base/login/LoginMainActivity;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/hyphenate/chat/EMTextMessageBody;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/hyphenate/chat/EMMessage;->addBody(Lcom/hyphenate/chat/EMMessageBody;)V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/hyphenate/chat/EMChatManager;->saveMessage(Lcom/hyphenate/chat/EMMessage;)V

    :try_start_0
    invoke-static {}, Lcom/waiqin365/lightapp/im/domain/c;->a()Lcom/waiqin365/lightapp/im/domain/c;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/base/login/cj;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    invoke-virtual {v2}, Lcom/waiqin365/base/login/LoginMainActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/im/domain/c;->a(Landroid/content/Context;)Lcom/waiqin365/lightapp/im/domain/c;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/waiqin365/lightapp/im/domain/c;->a(Lcom/hyphenate/chat/EMMessage;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/base/login/cj;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    new-instance v1, Lcom/waiqin365/base/login/cq;

    invoke-direct {v1, p0}, Lcom/waiqin365/base/login/cq;-><init>(Lcom/waiqin365/base/login/cj;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/login/LoginMainActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public onApplicationDeclined(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 2

    const-string/jumbo v0, "LoginmainIM"

    const-string/jumbo v1, "onApplicationDeclined"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-void
.end method

.method public onApplicationReceived(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 4

    new-instance v0, Lcom/waiqin365/lightapp/im/domain/i;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/im/domain/i;-><init>()V

    invoke-virtual {v0, p3}, Lcom/waiqin365/lightapp/im/domain/i;->a(Ljava/lang/String;)V

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Lcom/waiqin365/lightapp/im/domain/i;->a(J)V

    invoke-virtual {v0, p1}, Lcom/waiqin365/lightapp/im/domain/i;->c(Ljava/lang/String;)V

    invoke-virtual {v0, p2}, Lcom/waiqin365/lightapp/im/domain/i;->d(Ljava/lang/String;)V

    invoke-virtual {v0, p4}, Lcom/waiqin365/lightapp/im/domain/i;->b(Ljava/lang/String;)V

    sget-object v1, Lcom/waiqin365/lightapp/im/domain/j;->d:Lcom/waiqin365/lightapp/im/domain/j;

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/domain/i;->a(Lcom/waiqin365/lightapp/im/domain/j;)V

    iget-object v1, p0, Lcom/waiqin365/base/login/cj;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    # invokes: Lcom/waiqin365/base/login/LoginMainActivity;->notifyNewIviteMessage(Lcom/waiqin365/lightapp/im/domain/i;)V
    invoke-static {v1, v0}, Lcom/waiqin365/base/login/LoginMainActivity;->access$4800(Lcom/waiqin365/base/login/LoginMainActivity;Lcom/waiqin365/lightapp/im/domain/i;)V

    return-void
.end method

.method public onAutoAcceptInvitationFromGroup(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1

    new-instance v0, Lcom/waiqin365/base/login/co;

    invoke-direct {v0, p0, p1}, Lcom/waiqin365/base/login/co;-><init>(Lcom/waiqin365/base/login/cj;Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/waiqin365/base/login/co;->start()V

    return-void
.end method

.method public onGroupDestroyed(Ljava/lang/String;Ljava/lang/String;)V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/base/login/cj;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    new-instance v1, Lcom/waiqin365/base/login/cn;

    invoke-direct {v1, p0, p2}, Lcom/waiqin365/base/login/cn;-><init>(Lcom/waiqin365/base/login/cj;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/login/LoginMainActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method public onInvitationAccepted(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0

    return-void
.end method

.method public onInvitationDeclined(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0

    return-void
.end method

.method public onInvitationReceived(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 2

    const-string/jumbo v0, "LoginmainIM"

    const-string/jumbo v1, "onInvitationReceived"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    new-instance v0, Lcom/waiqin365/base/login/ck;

    invoke-direct {v0, p0, p1}, Lcom/waiqin365/base/login/ck;-><init>(Lcom/waiqin365/base/login/cj;Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/waiqin365/base/login/ck;->start()V

    return-void
.end method

.method public onUserRemoved(Ljava/lang/String;Ljava/lang/String;)V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/base/login/cj;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    const/4 v1, 0x0

    invoke-virtual {v0, p1, v1}, Lcom/waiqin365/base/login/LoginMainActivity;->updateGroup(Ljava/lang/String;Z)V

    iget-object v0, p0, Lcom/waiqin365/base/login/cj;->a:Lcom/waiqin365/base/login/LoginMainActivity;

    new-instance v1, Lcom/waiqin365/base/login/cm;

    invoke-direct {v1, p0, p2}, Lcom/waiqin365/base/login/cm;-><init>(Lcom/waiqin365/base/login/cj;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/login/LoginMainActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method
